import React, { Component } from 'react'

export default class Details extends Component {
    render() {
        let arr = [
            {id:1,content:"小少妇"},
            {id:2,content:"半个小时"},
            {id:3,content:"慢慢的"},
        ]
        let id = this.props.location.state.id || 1;
        let obj = arr.find(item=>item.id === id) || {};
        return (
            <div>
                {obj.content}
            </div>
        )
    }
}
